package org.cfk.delaytasktutorial.model;

import lombok.Data;
import lombok.experimental.Accessors;

@Data
@Accessors(chain = true)
public class DelayedMessage {
    /**
     * 消息类型，对应LazyJob的worker
     */
    private String type;

    /**
     * 消息体，对应LazyJob的content
     */
    private String body;

    /**
     * 延迟时间（毫秒）
     */
    private long delayTime;

    /**
     * 创建时间
     */
    private long createTime;


    private Integer retryLevel;

    public DelayedMessage() {
        this.createTime = System.currentTimeMillis();
    }
}